﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JszbIndex.aspx.cs" Inherits="Xiaov.SmartWeb.Application.HXZB.JszbIndex" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>技术指标</title>
    <script type="text/javascript" src="/Resources/easyui-1.32/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="/Resources/xiaovcn/scripts/usercheck.js"></script>
    <script type='text/javascript' src='../../SupCan/binary/dynaload.js?11'></script>
    <script type="text/javascript" language="javascript">
        var count = 0;
        function OnReady(id) {
            count++;
            var ddlnf = document.getElementById("ddl_Year");
            var nf = ddlnf.options[ddlnf.selectedIndex].value;   //获取年份
            var ddlyf = document.getElementById("ddl_Month");
            var yf = ddlyf.options[ddlyf.selectedIndex].value;   //获取月份
            var dwbm = "HB";
            if (id == "AF") {
                form1.AF.func("Build", "JszbIndex.xml");
                form1.AF.func("Load", "JszbIndexData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm));
            }
            if (count == 4) {
                var zbbm = "TG070006";
                var zbmc = "单位油气综合能耗";
                AddSeriesRight(zbmc, zbbm, dwbm, nf, yf); //右上图
                AddSeriesLeftDown(zbmc, zbbm, dwbm, nf, yf); //左上图
                AddSeriesRightDown(zbmc, zbbm, dwbm, nf, yf); //右下图
            }
        }
        function OnEvent(id, Event, p1, p2, p3, p4) {
            var ddlnf = document.getElementById("ddl_Year");
            var nf = ddlnf.options[ddlnf.selectedIndex].value;   //获取年份
            var ddlyf = document.getElementById("ddl_Month");
            var yf = ddlyf.options[ddlyf.selectedIndex].value;   //获取月份
            var dwbm = "HB";
            if (id == "AF" && Event == "Clicked" && p2 == "zbmc" && p3 != "") {//点击超链接时 
                var zbbm = document.AF.func("GetCellData", p1 + "\r\nzbbm\r\nfalse");
                var zbmc = document.AF.func("GetCellData", p1 + "\r\nzbmc\r\nfalse");
                AddSeriesRight(zbmc, zbbm, dwbm, nf, yf); //右上图
                AddSeriesLeftDown(zbmc, zbbm, dwbm, nf, yf); //左上图
                AddSeriesRightDown(zbmc, zbbm, dwbm, nf, yf); //右下图
            }
        }
        function AddSeriesRight(zbmc, zbbm, dwbm, nf, yf) {//右上图
            document.AF1.func("SetProp", "Caption\r\n" + zbmc);
            document.AF1.func("DeleteAllSeries", "");
            var titles = "", bndatas = "", qndatas = "";
            titles = document.AF1.func("download", "JszbRightData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=title \r\n toString=true; isEcho=false");
            bndatas = document.AF1.func("download", "JszbRightData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=bnlj \r\n toString=true; isEcho=false");
            qndatas = document.AF1.func("download", "JszbRightData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=qntq \r\n toString=true; isEcho=false");
            document.AF1.func("AddSeries", "本年累计 \r\n" + titles + "\r\n" + bndatas);
            document.AF1.func("AddSeries", "去年同期 \r\n" + titles + "\r\n" + qndatas);
        }
        function AddSeriesLeftDown(zbmc, zbbm, dwbm, nf, yf) {//左下图
            document.AF2.func("SetProp", "Caption\r\n" + zbmc + "母项");
            document.AF2.func("DeleteAllSeries", "");
            var titles = "", bndatas = "", qndatas = "";
            titles = document.AF2.func("download", "JszbLeftDownData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=title \r\n toString=true; isEcho=false");
            bndatas = document.AF2.func("download", "JszbLeftDownData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=bnlj \r\n toString=true; isEcho=false");
            qndatas = document.AF2.func("download", "JszbLeftDownData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=qntq \r\n toString=true; isEcho=false");
            document.AF2.func("AddSeries", "本年累计 \r\n" + titles + "\r\n" + bndatas);
            document.AF2.func("AddSeries", "去年同期 \r\n" + titles + "\r\n" + qndatas);
        }
        function AddSeriesRightDown(zbmc, zbbm, dwbm, nf, yf) {//右下图
            document.AF3.func("SetProp", "Caption\r\n" + zbmc + "子项");
            document.AF3.func("DeleteAllSeries", "");
            var titles = "", bndatas = "", qndatas = "";
            titles = document.AF3.func("download", "JszbRightDownData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=title \r\n toString=true; isEcho=false");
            bndatas = document.AF3.func("download", "JszbRightDownData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=bnlj \r\n toString=true; isEcho=false");
            qndatas = document.AF3.func("download", "JszbRightDownData.aspx?nf=" + escape(nf) + "&yf=" + escape(yf) + "&dwbm=" + escape(dwbm) + "&zbbm=" + escape(zbbm) + "&type=qntq \r\n toString=true; isEcho=false");
            document.AF3.func("AddSeries", "本年累计 \r\n" + titles + "\r\n" + bndatas);
            document.AF3.func("AddSeries", "去年同期 \r\n" + titles + "\r\n" + qndatas);
        }

        $(function () {
            $('#content').height(userScreenHeight);
        });   
    </script>
</head>
<body>
    <form id="form1" runat="server" action="JszbIndex.aspx" method="post">
    <div id="content" style="overflow: scroll; height: 100%">
        <div class="tools" style="height: 5%; width: 100%">
            <asp:DropDownList ID="ddl_Owner" runat="server" Visible="false">
            </asp:DropDownList>
            <asp:DropDownList ID="ddl_Year" runat="server">
            </asp:DropDownList>
            <asp:DropDownList ID="ddl_Month" runat="server">
            </asp:DropDownList>
            <asp:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" />
        </div>
        <div style="height: 50%; width: 50%; float: left">
            <script language="javascript" type="text/javascript">
                insertTreeList('AF', '') 
            </script>
        </div>
        <div style="height: 50%; width: 50%; float: left">
            <script language="javascript" type="text/javascript">
                insertChart('AF1', 'chart=1;textContent=0;bordercolor=#4499ff; borderWidth=2; borderRound=23;backcolor=#fff5ea,#f0e0d0;valueMask=####');
            </script>
        </div>
        <div style="height: 42%; width: 50%; float: left">
            <script language="javascript" type="text/javascript">
                insertChart('AF2', 'chart=1;textContent=0;bordercolor=#4499ff; borderWidth=2; borderRound=23;backcolor=#fff5ea,#f0e0d0;valueMask=####');
            </script>
        </div>
        <div style="height: 42%; width: 50%; float: left">
            <script language="javascript" type="text/javascript">
                insertChart('AF3', 'chart=1;textContent=0;bordercolor=#4499ff; borderWidth=2; borderRound=23;backcolor=#fff5ea,#f0e0d0;valueMask=####');
            </script>
        </div>
    </div>
    </form>
</body>
</html>
